class Student():
    # 定义属性
    def __init__(self,name,score):
        self.name=name
        self.score=score

    # 定义方法
    def print_grade(self):
        if self.score >= 90:
            print(f'{self.name}成绩为{self.score},优秀')
        elif  self.score >= 80:
            print(f'{self.name}成绩为{self.score},良好')
        elif self.score >= 70:
            print(f'{self.name}成绩为{self.score},中等')
        elif self.score >= 60:
            print(f'{self.name}成绩为{self.score},及格')
        else:
            print(f'{self.name}成绩为{self.score},不及格')

S1 = Student('tom',99)
S1.print_grade()
S2 =Student('jerry',88)
S2.print_grade()
